#include "clayoutitem.h"

/**
 * CLayoutItem - constructor, initialization
 * @param componentPtr
 * @param posX
 * @param posY
 * @param spanX
 * @param spanY
 */
CLayoutItem::CLayoutItem(CGuiObject* componentPtr, TIndex posX,
    TIndex posY, TIndex spanX, TIndex spanY) {
  this->componentPtr = componentPtr;
  this->posX = posX;
  this->posY = posY;
  this->spanX = spanX;
  this->spanY = spanY;
}
//---------------------------------------------------------------------------

/**
 * getComponentPtr - returns pointer on component placed in layout
 * @return component pointer
 */
CGuiObject* CLayoutItem::getComponentPtr() {
  return componentPtr;
}
//---------------------------------------------------------------------------

/**
 * getPosX - returns column of component in layout
 * @return component column
 */
TIndex CLayoutItem::getPosX() const {
  return posX;
}
//---------------------------------------------------------------------------

/**
 * getPosY - returns row of component in layout
 * @return component row
 */
TIndex CLayoutItem::getPosY() const {
  return posY;
}
//---------------------------------------------------------------------------

/**
 * getSpanX - returns number of cells in row that component occupies
 * @return number of cells
 */
TIndex CLayoutItem::getSpanX() const {
  return spanX;
}
//---------------------------------------------------------------------------

/**
 * getSpanY - returns number of cells in column that component occupies
 * @return number of cells
 */
TIndex CLayoutItem::getSpanY() const {
  return spanY;
}
//---------------------------------------------------------------------------
